home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Best of MacTutor - S…e Code for Volumes 1 to 5
/
The Best of MacTutor - Source Code for Volume 1-5 (Wayzata Technology)(6031)(1990).bin
/
Source Code
/
#02 (Apr85-Jul85)
/
modula 2
/
modula Vol. 1 #8
/
VolumeTracer.DEF
< prev
next >
Wrap
Text File
|
1985-05-09
|
2KB
|
49 lines
DEFINITION MODULE VolumeTracer;
FROM MacSystemTypes IMPORT LongCard, Ptr;
EXPORT QUALIFIED VCB, VolumesOnLine, GetVolumeInfo;
TYPE
QElemPtr = POINTER TO VCB;
VCB = RECORD
qLink: QElemPtr; (* next queue entry *)
qType: INTEGER; (* not used *)
vcbFlags: INTEGER; (* bit 15=1 if dirty *)
vcbSigWord: INTEGER; (* always $D2D7 *)
vcbCrDate: LongCard; (* date volume was initialized *)
vcbLsBkUp: LongCard; (* date of last backup *)
vcbAtrb: INTEGER; (* volume attributes *)
vcbNmFls: INTEGER; (* number of files in directory *)
vcbDirSt: INTEGER; (* directory's first block *)
vcbBlLn: INTEGER; (* length of file directory *)
vcbNmBlks: INTEGER; (* number of allocation blocks *)
vcbAlBlkSiz: LongCard; (* size of allocation blocks *)
vcbClpSiz: LongCard; (* number of bytes to allocate *)
vcbAlBlSt: INTEGER; (* first block in block map *)
vcbNxtFNum: LongCard; (* next unused file number *)
vcbFreeBks: INTEGER; (* number of unused blocks *)
vcbVN: ARRAY [0..27] OF CHAR;(* volume name Str255 format *)
vcbDrvNum: INTEGER; (* drive number *)
vcbDRefNum: INTEGER; (* driver reference number *)
vcbFSID: INTEGER; (* file system identifier *)
vcbVRefNum: INTEGER; (* volume reference number *)
vcbMAdr: Ptr; (* location of block map *)
vcbBufAdr: Ptr; (* location of volume buffer *)
vcbMLen: INTEGER; (* number of bytes in block map *)
vcbDirIndex: INTEGER; (* used internally *)
vcbDirBlk: INTEGER; (* used internally *)
END;
PROCEDURE VolumesOnLine(): CARDINAL;
(* Returns the maximum number of volumes currently recognized by the
Mac operating system. *)
PROCEDURE GetVolumeInfo(VAR volume : VCB; whichVol : CARDINAL);
(* Returns the current VCB block for volume "whichVol" The variable
"whichVol" must be between 1 and the result of the procedure of
"VolumesOnLine()". Otherwise, the "volume" info is undefined. *)
END VolumeTracer.